//编写你自己的单词计数程序。
#include<iostream>
#include<vector>
#include<list>
#include<algorithm>
#include<iterator>
#include<fstream>
#include<string>
#include<map>
#include<string>
using namespace std;
int main()
{
	ifstream in("text.txt");
	if (!in){
		cout << "error to open file" << endl;
		exit(1);
	}
	map<string, size_t>word_count;
	string word;
	while (in >> word) {
		++word_count[word];
	}
	for (auto &k : word_count)
	{
		cout << k.first << "num" << k.second << endl;
	}
}